package com.ygqh.baby.mapper;

import com.ygqh.baby.ao.QueryInfo;
import com.ygqh.baby.po.BiSupplierOrderDay;
import com.ygqh.baby.po.BiSupplierOrderDayExample;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface BiSupplierOrderDayMapper {

	int countByExample(BiSupplierOrderDayExample example);

	int deleteByExample(BiSupplierOrderDayExample example);

	int deleteByPrimaryKey(Long id);

	int insert(BiSupplierOrderDay record);

	int insertSelective(BiSupplierOrderDay record);

	List<BiSupplierOrderDay> selectByExample(BiSupplierOrderDayExample example);

	BiSupplierOrderDay selectByPrimaryKey(Long id);

	int updateByExampleSelective(@Param("record") BiSupplierOrderDay record, @Param("example") BiSupplierOrderDayExample example);

	int updateByExample(@Param("record") BiSupplierOrderDay record, @Param("example") BiSupplierOrderDayExample example);

	int updateByPrimaryKeySelective(BiSupplierOrderDay record);

	int updateByPrimaryKey(BiSupplierOrderDay record);

	int countSuper(@Param("q") String q, @Param("startDate") Date startDate, @Param("endDate") Date endDate, @Param("supplierId") Long supplierId);

	List<BiSupplierOrderDay> selectSuper(@Param("queryInfo") QueryInfo queryInfo, @Param("q") String q, @Param("startDate") Date startDate,
										 @Param("endDate") Date endDate, @Param("supplierId") Long supplierId);

	int insertBatch(@Param("list") List<BiSupplierOrderDay> biSupplierOrderDayList);

	List<BiSupplierOrderDay> supplierOrderReportWithSplitYG(@Param("startDate") Date startDate, @Param("endDate") Date endDate);

	List<BiSupplierOrderDay> executeOrderStatisticsBySupplier(@Param("startDate") Date startDate, @Param("endDate") Date endDate,
															  @Param("currentOrderDay") boolean currentOrderDay);

	List<BiSupplierOrderDay> executeOrderCostPriceBySupplier(@Param("startDate") Date startDate, @Param("endDate") Date endDate,
															 @Param("currentOrderDay") boolean currentOrderDay);

	List<BiSupplierOrderDay> selectSupplierOrderByMonth(@Param("startDate") Date startDate, @Param("endDate") Date endDate);

	List<BiSupplierOrderDay> selectSuperByMonth(@Param("queryInfo") QueryInfo queryInfo, @Param("startDate") Date startDate, @Param("endDate") Date endDate);

	int countSuperByMonth(@Param("startDate") Date startDate, @Param("endDate") Date endDate);

	List<BiSupplierOrderDay> executeOrderStatisticsBySupplierV2(@Param("startDate") Date startDate,
																@Param("endDate") Date endDate,
																@Param("currentOrderDay") boolean currentOrderDay,
																@Param("splitPlatform") boolean splitPlatform);

	int deleteBetweenDate(@Param("startDate") Date startDate, @Param("endDate") Date endDate);

	List<BiSupplierOrderDay> executeOrderStatisticsBySku(@Param("startDate") Date startDate, @Param("endDate") Date endDate);

	List<BiSupplierOrderDay> supplierOrderReportByMonth(@Param("queryInfo") QueryInfo queryInfo,
														@Param("startDate") Date startDate,
														@Param("endDate") Date endDate,
														@Param("platformNo") String platformNo,
														@Param("ygSupplierId") Long ygSupplierId,
														@Param("groupSupplier") boolean groupSupplier,
														@Param("splitYg") boolean splitYg);

	int countSupplierOrderReportByMonth(@Param("startDate") Date startDate,
										@Param("endDate") Date endDate,
										@Param("platformNo") String platformNo,
										@Param("ygSupplierId") Long ygSupplierId,
										@Param("groupSupplier") boolean groupSupplier,
										@Param("splitYg") boolean splitYg);
}
